<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form method="post" action="/registerServlet">
    用户名:<input type="text" name="username" value="" ><br>
    电子邮箱：<input type="email" name="e-mail"><br>
 爱好: <input type="checkbox" name="hobby" value="football">足球
  <input type="checkbox" name="hobby" value="basketball">篮球
  <input type="checkbox" name="hobby" value="volleyball">排球<br>
    验证码:<input type="text" name="ckimg">
    <img src="/Checkcode " id="_img"><br>
    <input type="submit">
</form>
<script>
    window.onload = function(){
        var _img=document.getElementById("_img");
        _img.onclick=function () {
            var date=new Date();
            _img.src="/Checkcode?"+date.getTime();
        };
    }
</script>
</body>
</html>